using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ExamServer.Entities
{
    public class tbRoles
    {
        [Key,DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        [Display(Name="角色编号")]
        public int ID { get; set; }
        [Required(ErrorMessage="角色名称必填")]
        [Display(Name="角色名称")]
        public string RoleName { get; set; }
        [Display(Name="角色状态")]
        public StateEnum RoleState{get;set;}

        //用户角色关联
        public virtual IList<tbUsersAndRoles> UserRoles{get;set;}
        //角色菜单关联
        public virtual IList<tbRolesAndMenus> RolesAndMenus{get;set;}
    }
}